package 实现类;

import java.util.Scanner;

public class youxiang {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("请输入邮箱");
        String a=input.next();
        String f=a.substring(a.indexOf(".com"));
        if (a.lastIndexOf("@")==-1){
            System.out.println("邮箱格式不正确");
        }else if (!f.equals(".com")){
            System.out.println("cuo");
        }else{
            if (a.lastIndexOf("@")<a.lastIndexOf(".")){
                System.out.println("------");
            }else {
                System.out.println("邮箱格式不正确");
            }
        }
    }
}
